3.13.18 \(\int \cos ^3(c+d x) \cot ^2(c+d x) (a+b \sin (c+d x))^2 \, dx\) [1218]

3.13.18.1 Optimal result
3.13.18.2 Mathematica [A] (verified)
3.13.18.3 Rubi [A] (verified)
3.13.18.4 Maple [A] (verified)
3.13.18.5 Fricas [A] (verification not implemented)
3.13.18.6 Sympy [F(-1)]
3.13.18.7 Maxima [A] (verification not implemented)
3.13.18.8 Giac [A] (verification not implemented)
3.13.18.9 Mupad [B] (verification not implemented)

3.13.18.1 Optimal result

Integrand size = 29, antiderivative size = 125 \[ \int \cos ^3(c+d x) \cot ^2(c+d x) (a+b \sin (c+d x))^2 \, dx=-\frac {a^2 \csc (c+d x)}{d}+\frac {2 a b \log (\sin (c+d x))}{d}-\frac {\left (2 a^2-b^2\right ) \sin (c+d x)}{d}-\frac {2 a b \sin ^2(c+d x)}{d}+\frac {\left (a^2-2 b^2\right ) \sin ^3(c+d x)}{3 d}+\frac {a b \sin ^4(c+d x)}{2 d}+\frac {b^2 \sin ^5(c+d x)}{5 d} \]

output
-a^2*csc(d*x+c)/d+2*a*b*ln(sin(d*x+c))/d-(2*a^2-b^2)*sin(d*x+c)/d-2*a*b*si 
n(d*x+c)^2/d+1/3*(a^2-2*b^2)*sin(d*x+c)^3/d+1/2*a*b*sin(d*x+c)^4/d+1/5*b^2 
*sin(d*x+c)^5/d
 
3.13.18.2 Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 142, normalized size of antiderivative = 1.14 \[ \int \cos ^3(c+d x) \cot ^2(c+d x) (a+b \sin (c+d x))^2 \, dx=-\frac {a^2 \csc (c+d x)}{d}+\frac {2 a b \log (\sin (c+d x))}{d}-\frac {2 a^2 \sin (c+d x)}{d}+\frac {b^2 \sin (c+d x)}{d}-\frac {2 a b \sin ^2(c+d x)}{d}+\frac {a^2 \sin ^3(c+d x)}{3 d}-\frac {2 b^2 \sin ^3(c+d x)}{3 d}+\frac {a b \sin ^4(c+d x)}{2 d}+\frac {b^2 \sin ^5(c+d x)}{5 d} \]

input
Integrate[Cos[c + d*x]^3*Cot[c + d*x]^2*(a + b*Sin[c + d*x])^2,x]
 
output
-((a^2*Csc[c + d*x])/d) + (2*a*b*Log[Sin[c + d*x]])/d - (2*a^2*Sin[c + d*x 
])/d + (b^2*Sin[c + d*x])/d - (2*a*b*Sin[c + d*x]^2)/d + (a^2*Sin[c + d*x] 
^3)/(3*d) - (2*b^2*Sin[c + d*x]^3)/(3*d) + (a*b*Sin[c + d*x]^4)/(2*d) + (b 
^2*Sin[c + d*x]^5)/(5*d)
 
3.13.18.3 Rubi [A] (verified)

Time = 0.34 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.02, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {3042, 3316, 27, 522, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \cos ^3(c+d x) \cot ^2(c+d x) (a+b \sin (c+d x))^2 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\cos (c+d x)^5 (a+b \sin (c+d x))^2}{\sin (c+d x)^2}dx\)

\(\Big \downarrow \) 3316

\(\displaystyle \frac {\int \csc ^2(c+d x) (a+b \sin (c+d x))^2 \left (b^2-b^2 \sin ^2(c+d x)\right )^2d(b \sin (c+d x))}{b^5 d}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\int \frac {\csc ^2(c+d x) (a+b \sin (c+d x))^2 \left (b^2-b^2 \sin ^2(c+d x)\right )^2}{b^2}d(b \sin (c+d x))}{b^3 d}\)

\(\Big \downarrow \) 522

\(\displaystyle \frac {\int \left (b^4 \sin ^4(c+d x)+2 a b^3 \sin ^3(c+d x)+b^2 \left (a^2-2 b^2\right ) \sin ^2(c+d x)-4 a b^3 \sin (c+d x)+a^2 b^2 \csc ^2(c+d x)-2 a^2 b^2 \left (1-\frac {b^2}{2 a^2}\right )+2 a b^3 \csc (c+d x)\right )d(b \sin (c+d x))}{b^3 d}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {-a^2 b^3 \csc (c+d x)+\frac {1}{3} b^3 \left (a^2-2 b^2\right ) \sin ^3(c+d x)-b^3 \left (2 a^2-b^2\right ) \sin (c+d x)+\frac {1}{2} a b^4 \sin ^4(c+d x)-2 a b^4 \sin ^2(c+d x)+2 a b^4 \log (b \sin (c+d x))+\frac {1}{5} b^5 \sin ^5(c+d x)}{b^3 d}\)

input
Int[Cos[c + d*x]^3*Cot[c + d*x]^2*(a + b*Sin[c + d*x])^2,x]
 
output
(-(a^2*b^3*Csc[c + d*x]) + 2*a*b^4*Log[b*Sin[c + d*x]] - b^3*(2*a^2 - b^2) 
*Sin[c + d*x] - 2*a*b^4*Sin[c + d*x]^2 + (b^3*(a^2 - 2*b^2)*Sin[c + d*x]^3 
)/3 + (a*b^4*Sin[c + d*x]^4)/2 + (b^5*Sin[c + d*x]^5)/5)/(b^3*d)
 

3.13.18.3.1 Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 522
Int[((e_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_)^2)^(p_. 
), x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*(c + d*x)^n*(a + b*x^2)^p, x], 
x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3316
Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_ 
.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Simp[1/(b^p* 
f)   Subst[Int[(a + x)^m*(c + (d/b)*x)^n*(b^2 - x^2)^((p - 1)/2), x], x, b* 
Sin[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IntegerQ[(p - 1) 
/2] && NeQ[a^2 - b^2, 0]
 
3.13.18.4 Maple [A] (verified)

Time = 0.61 (sec) , antiderivative size = 120, normalized size of antiderivative = 0.96

method result size
derivativedivides \(\frac {a^{2} \left (-\frac {\cos ^{6}\left (d x +c \right )}{\sin \left (d x +c \right )}-\left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )\right )+2 a b \left (\frac {\left (\cos ^{4}\left (d x +c \right )\right )}{4}+\frac {\left (\cos ^{2}\left (d x +c \right )\right )}{2}+\ln \left (\sin \left (d x +c \right )\right )\right )+\frac {b^{2} \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}}{d}\) \(120\)
default \(\frac {a^{2} \left (-\frac {\cos ^{6}\left (d x +c \right )}{\sin \left (d x +c \right )}-\left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )\right )+2 a b \left (\frac {\left (\cos ^{4}\left (d x +c \right )\right )}{4}+\frac {\left (\cos ^{2}\left (d x +c \right )\right )}{2}+\ln \left (\sin \left (d x +c \right )\right )\right )+\frac {b^{2} \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}}{d}\) \(120\)
parallelrisch \(\frac {-24 \ln \left (\sec ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a b +24 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a b +5 \sec \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\cos \left (2 d x +2 c \right )+\frac {\cos \left (4 d x +4 c \right )}{20}-\frac {9}{4}\right ) a^{2} \csc \left (\frac {d x}{2}+\frac {c}{2}\right )+9 b \left (a \cos \left (2 d x +2 c \right )+\frac {\cos \left (4 d x +4 c \right ) a}{12}+\frac {b \sin \left (5 d x +5 c \right )}{60}+\frac {5 b \sin \left (d x +c \right )}{6}+\frac {5 b \sin \left (3 d x +3 c \right )}{36}-\frac {13 a}{12}\right )}{12 d}\) \(145\)
risch \(-2 i x a b +\frac {3 a b \,{\mathrm e}^{2 i \left (d x +c \right )}}{8 d}+\frac {7 i a^{2} {\mathrm e}^{i \left (d x +c \right )}}{8 d}-\frac {5 i {\mathrm e}^{i \left (d x +c \right )} b^{2}}{16 d}-\frac {7 i a^{2} {\mathrm e}^{-i \left (d x +c \right )}}{8 d}+\frac {5 i {\mathrm e}^{-i \left (d x +c \right )} b^{2}}{16 d}+\frac {3 a b \,{\mathrm e}^{-2 i \left (d x +c \right )}}{8 d}-\frac {4 i a b c}{d}-\frac {2 i a^{2} {\mathrm e}^{i \left (d x +c \right )}}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}+\frac {2 a b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d}+\frac {\sin \left (5 d x +5 c \right ) b^{2}}{80 d}+\frac {a b \cos \left (4 d x +4 c \right )}{16 d}-\frac {a^{2} \sin \left (3 d x +3 c \right )}{12 d}+\frac {5 \sin \left (3 d x +3 c \right ) b^{2}}{48 d}\) \(238\)
norman \(\frac {-\frac {a^{2}}{2 d}-\frac {a^{2} \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}-\frac {\left (7 a^{2}-2 b^{2}\right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {\left (7 a^{2}-2 b^{2}\right ) \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {\left (125 a^{2}-16 b^{2}\right ) \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 d}-\frac {\left (125 a^{2}-16 b^{2}\right ) \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 d}-\frac {2 \left (215 a^{2}-58 b^{2}\right ) \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{15 d}-\frac {8 a b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {16 a b \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {16 a b \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {8 a b \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}+\frac {2 a b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {2 a b \ln \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}\) \(302\)

input
int(cos(d*x+c)^5*csc(d*x+c)^2*(a+b*sin(d*x+c))^2,x,method=_RETURNVERBOSE)
 
output
1/d*(a^2*(-1/sin(d*x+c)*cos(d*x+c)^6-(8/3+cos(d*x+c)^4+4/3*cos(d*x+c)^2)*s 
in(d*x+c))+2*a*b*(1/4*cos(d*x+c)^4+1/2*cos(d*x+c)^2+ln(sin(d*x+c)))+1/5*b^ 
2*(8/3+cos(d*x+c)^4+4/3*cos(d*x+c)^2)*sin(d*x+c))
 
3.13.18.5 Fricas [A] (verification not implemented)

Time = 0.38 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.08 \[ \int \cos ^3(c+d x) \cot ^2(c+d x) (a+b \sin (c+d x))^2 \, dx=-\frac {48 \, b^{2} \cos \left (d x + c\right )^{6} - 16 \, {\left (5 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{4} - 480 \, a b \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) \sin \left (d x + c\right ) - 64 \, {\left (5 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + 640 \, a^{2} - 128 \, b^{2} - 15 \, {\left (8 \, a b \cos \left (d x + c\right )^{4} + 16 \, a b \cos \left (d x + c\right )^{2} - 11 \, a b\right )} \sin \left (d x + c\right )}{240 \, d \sin \left (d x + c\right )} \]

input
integrate(cos(d*x+c)^5*csc(d*x+c)^2*(a+b*sin(d*x+c))^2,x, algorithm="frica 
s")
 
output
-1/240*(48*b^2*cos(d*x + c)^6 - 16*(5*a^2 - b^2)*cos(d*x + c)^4 - 480*a*b* 
log(1/2*sin(d*x + c))*sin(d*x + c) - 64*(5*a^2 - b^2)*cos(d*x + c)^2 + 640 
*a^2 - 128*b^2 - 15*(8*a*b*cos(d*x + c)^4 + 16*a*b*cos(d*x + c)^2 - 11*a*b 
)*sin(d*x + c))/(d*sin(d*x + c))
 
3.13.18.6 Sympy [F(-1)]

Timed out. \[ \int \cos ^3(c+d x) \cot ^2(c+d x) (a+b \sin (c+d x))^2 \, dx=\text {Timed out} \]

input
integrate(cos(d*x+c)**5*csc(d*x+c)**2*(a+b*sin(d*x+c))**2,x)
 
output
Timed out
 
3.13.18.7 Maxima [A] (verification not implemented)

Time = 0.21 (sec) , antiderivative size = 105, normalized size of antiderivative = 0.84 \[ \int \cos ^3(c+d x) \cot ^2(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {6 \, b^{2} \sin \left (d x + c\right )^{5} + 15 \, a b \sin \left (d x + c\right )^{4} - 60 \, a b \sin \left (d x + c\right )^{2} + 10 \, {\left (a^{2} - 2 \, b^{2}\right )} \sin \left (d x + c\right )^{3} + 60 \, a b \log \left (\sin \left (d x + c\right )\right ) - 30 \, {\left (2 \, a^{2} - b^{2}\right )} \sin \left (d x + c\right ) - \frac {30 \, a^{2}}{\sin \left (d x + c\right )}}{30 \, d} \]

input
integrate(cos(d*x+c)^5*csc(d*x+c)^2*(a+b*sin(d*x+c))^2,x, algorithm="maxim 
a")
 
output
1/30*(6*b^2*sin(d*x + c)^5 + 15*a*b*sin(d*x + c)^4 - 60*a*b*sin(d*x + c)^2 
 + 10*(a^2 - 2*b^2)*sin(d*x + c)^3 + 60*a*b*log(sin(d*x + c)) - 30*(2*a^2 
- b^2)*sin(d*x + c) - 30*a^2/sin(d*x + c))/d
 
3.13.18.8 Giac [A] (verification not implemented)

Time = 0.40 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.02 \[ \int \cos ^3(c+d x) \cot ^2(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {6 \, b^{2} \sin \left (d x + c\right )^{5} + 15 \, a b \sin \left (d x + c\right )^{4} + 10 \, a^{2} \sin \left (d x + c\right )^{3} - 20 \, b^{2} \sin \left (d x + c\right )^{3} - 60 \, a b \sin \left (d x + c\right )^{2} + 60 \, a b \log \left ({\left | \sin \left (d x + c\right ) \right |}\right ) - 60 \, a^{2} \sin \left (d x + c\right ) + 30 \, b^{2} \sin \left (d x + c\right ) - \frac {30 \, {\left (2 \, a b \sin \left (d x + c\right ) + a^{2}\right )}}{\sin \left (d x + c\right )}}{30 \, d} \]

input
integrate(cos(d*x+c)^5*csc(d*x+c)^2*(a+b*sin(d*x+c))^2,x, algorithm="giac" 
)
 
output
1/30*(6*b^2*sin(d*x + c)^5 + 15*a*b*sin(d*x + c)^4 + 10*a^2*sin(d*x + c)^3 
 - 20*b^2*sin(d*x + c)^3 - 60*a*b*sin(d*x + c)^2 + 60*a*b*log(abs(sin(d*x 
+ c))) - 60*a^2*sin(d*x + c) + 30*b^2*sin(d*x + c) - 30*(2*a*b*sin(d*x + c 
) + a^2)/sin(d*x + c))/d
 
3.13.18.9 Mupad [B] (verification not implemented)

Time = 11.99 (sec) , antiderivative size = 445, normalized size of antiderivative = 3.56 \[ \int \cos ^3(c+d x) \cot ^2(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {16\,a\,b\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{d}-\frac {8\,a\,b\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{d}-\frac {16\,a\,b\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{d}+\frac {8\,a\,b\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8}{d}+\frac {20\,a^2\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{3\,d\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}-\frac {16\,a^2\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{3\,d\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}+\frac {8\,a^2\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{3\,d\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}-\frac {22\,b^2\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{3\,d\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}+\frac {256\,b^2\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{15\,d\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}-\frac {368\,b^2\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{15\,d\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}+\frac {96\,b^2\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{5\,d\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}-\frac {32\,b^2\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}}{5\,d\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}-\frac {2\,a\,b\,\ln \left (\frac {1}{{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}\right )}{d}+\frac {2\,a\,b\,\ln \left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}-\frac {9\,a^2\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,d\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}-\frac {a^2\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,d\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}+\frac {2\,b^2\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )} \]

input
int((cos(c + d*x)^5*(a + b*sin(c + d*x))^2)/sin(c + d*x)^2,x)
 
output
(16*a*b*cos(c/2 + (d*x)/2)^4)/d - (8*a*b*cos(c/2 + (d*x)/2)^2)/d - (16*a*b 
*cos(c/2 + (d*x)/2)^6)/d + (8*a*b*cos(c/2 + (d*x)/2)^8)/d + (20*a^2*cos(c/ 
2 + (d*x)/2)^3)/(3*d*sin(c/2 + (d*x)/2)) - (16*a^2*cos(c/2 + (d*x)/2)^5)/( 
3*d*sin(c/2 + (d*x)/2)) + (8*a^2*cos(c/2 + (d*x)/2)^7)/(3*d*sin(c/2 + (d*x 
)/2)) - (22*b^2*cos(c/2 + (d*x)/2)^3)/(3*d*sin(c/2 + (d*x)/2)) + (256*b^2* 
cos(c/2 + (d*x)/2)^5)/(15*d*sin(c/2 + (d*x)/2)) - (368*b^2*cos(c/2 + (d*x) 
/2)^7)/(15*d*sin(c/2 + (d*x)/2)) + (96*b^2*cos(c/2 + (d*x)/2)^9)/(5*d*sin( 
c/2 + (d*x)/2)) - (32*b^2*cos(c/2 + (d*x)/2)^11)/(5*d*sin(c/2 + (d*x)/2)) 
- (2*a*b*log(1/cos(c/2 + (d*x)/2)^2))/d + (2*a*b*log(sin(c/2 + (d*x)/2)/co 
s(c/2 + (d*x)/2)))/d - (9*a^2*cos(c/2 + (d*x)/2))/(2*d*sin(c/2 + (d*x)/2)) 
 - (a^2*sin(c/2 + (d*x)/2))/(2*d*cos(c/2 + (d*x)/2)) + (2*b^2*cos(c/2 + (d 
*x)/2))/(d*sin(c/2 + (d*x)/2))